package com.asb.utils;

/**
 * 1.鞍山
 * 2.省分公司
 * 3.葫芦岛
 * 4.沈阳
 * 6.营口
 * 7.铁岭
 * 8.盘锦
 * 9.辽阳
 * 10.锦州
 * 12.阜新
 * 13.抚顺
 * 14.丹东
 * 15.大连
 * 16.朝阳
 * 17.本溪
 * @author lenovo
 * @create 2022/3/22 12:15
 */
public enum LocationEnum {

    ANSHAN("1", "鞍山"),
    SHENG("2", "省分公司"),
    HULUDAO("3", "葫芦岛"),
    SHENYANG("4", "沈阳"),
    YINKOU("6", "营口"),
    TIELING("7", "铁岭"),
    PANGJIN("8", "盘锦"),
    LIAOYANG("9", "辽阳"),
    JINZHOU("10", "锦州"),
    FUXIN("12", "阜新"),
    FUSHUN("13", "抚顺"),
    DANDONG("14", "丹东"),
    DALIAN("15", "大连"),
    CHAOYANG("16", "朝阳"),
    BENXI("17", "本溪");

    private final String code;

    private final String name;

    private LocationEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public static String getName(String code){
        for (LocationEnum locationEnum : LocationEnum.values()){
            if (locationEnum.getCode().equals(code)) {
                return locationEnum.name;
            }
        }
        return "";
    }

}
